home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 43
/
Amiga Format CD43 (1999)(Future Publishing)(GB)(Track 1 of 2)[!][issue 1999-09].iso
/
-serious-
/
programming
/
mui
/
mcc_pkb
/
developer
/
autodocs
/
mcc_pkb.doc
Wrap
Text File
|
1999-06-14
|
11KB
|
522 lines
TABLE OF CONTENTS
Pkb.mcc/Pkb.mcc
Pkb.mcc/MUIA_Pkb_Mode
Pkb.mcc/MUIA_Pkb_AutoRelease
Pkb.mcc/MUIA_Pkb_Current
Pkb.mcc/MUIA_Pkb_Quiet
Pkb.mcc/MUIA_Pkb_Pool
Pkb.mcc/MUIA_Pkb_PoolPuddleSize
Pkb.mcc/MUIA_Pkb_PoolThreshSize
Pkb.mcc/MUIA_Pkb_Octv_Name
Pkb.mcc/MUIA_Pkb_Octv_Base
Pkb.mcc/MUIA_Pkb_Octv_Range
Pkb.mcc/MUIA_Pkb_Octv_Start
Pkb.mcc/MUIA_Pkb_Key_Release
Pkb.mcc/MUIA_Pkb_Key_Press
Pkb.mcc/MUIA_Pkb_Range_Head
Pkb.mcc/MUIA_Pkb_Range_Start
Pkb.mcc/MUIA_Pkb_Range_End
Pkb.mcc/MUIA_Pkb_Low
Pkb.mcc/MUIA_Pkb_High
Pkb.mcc/MUIM_Pkb_Reset
Pkb.mcc/MUIM_Pkb_Refresh
Pkb.mcc/MUIM_Pkb_Range
Pkb.mcc/MUIM_Pkb_Range_Reset
Pkb.mcc/MUIM_Pkb_Range_Refresh
Pkb.mcc/MUIM_Pkb_Jump
Pkb.mcc/MUIA_Pkb_InputEnable
Pkb.mcc/MUIA_Pkb_ExcludeLow
Pkb.mcc/MUIA_Pkb_ExcludeHigh
Pkb.mcc/MUIA_Pkb_Type
Pkb.mcc/Pkb.mcc
Pkb is a Custom Class of the Magic User Interface © by Stefan Stuntz.
It's a subclass of Virtgroup-class.
The aim of this class is to provide a piano keyboard for generic music
applications.
Pkb uses different colours for the different working modes, and they
can be changed by the user through MCP.
Please have a look at the example program for further details.
The demo can be compiled with Dice or StormC 2.0.
NOTES
None at the moment.
Pkb.mcc/MUIA_Pkb_Mode
NAME
MUIA_Pkb_Mode -- (V14.3) [ISG], ULONG
FUNCTION
Sets or returns keyboard's operating mode.
INPUTS
MUIV_Pkb_Mode_NORMAL (default)
MUIV_Pkb_Mode_SPECIAL
MUIV_Pkb_Mode_RANGE
NOTES
The first two modes only differ for what regards the colour used for
depressed keys.
The third mode is used to mark a group of contiguous keys.
The MUIA_Pkb_Range_Start and MUIA_Pkb_Range_End attributes respectively
provide the start and the end key of the LAST selected group.
In this mode the MUIA_Pkb_Key_Release attribute is NOT set when the
user releases the mouse on the last key.
SEE ALSO
MUIA_Pkb_Range_Head
Pkb.mcc/MUIA_Pkb_AutoRelease
NAME
MUIA_Pkb_AutoRelease -- (V14.3) [ISG], BOOL
FUNCTION
Sets or detects the automatic key release.
INPUTS
-TRUE (default)
-FALSE
NOTES
If it is TRUE, the key is released when the user presses another key.
If it is FALSE, the key is not released, and its release is up to the
application.
SEE ALSO
MUIA_Pkb_Key_Press , MUIA_Pkb_Key_Release
Pkb.mcc/MUIA_Pkb_Current
NAME
MUIA_Pkb_Current -- (V14.3) [..GN], LONG
FUNCTION
Detects the code of the last note played (the last key pressed) by the
user.
NOTES
The return code ranges between 0 and 131 and is independent of the
octave number that could be shown on the bottom bar.
SEE ALSO
MUIA_Pkb_Octv_Start, MUIA_Pkb_Octv_Range, MUIA_Pkb_Key_Release
Pkb.mcc/MUIA_Pkb_Quiet
NAME
MUIA_Pkb_Quiet -- (V14.3) [.S.], BOOL
FUNCTION
If it is set to TRUE then no keys are drawn.
SEE ALSO
MUIM_Pkb_Refresh
Pkb.mcc/MUIA_Pkb_Pool
NAME
MUIA_Pkb_Pool -- (V14.3) [I.G], PoolHeader *
FUNCTION
Pass something from CreatePool() here if you don't want the table
to create its own memory pool but to use this one instead. Note
that pkb group class does *not* use semaphore protection when
accessing the pool, you must *not* use pools which are
accessed from other tasks than the application's main
task.
SEE ALSO
MUIA_Pkb_PoolPuddleSize, MUIA_Pkb_PoolThreshSize
Pkb.mcc/MUIA_Pkb_PoolPuddleSize
NAME
MUIA_Pkb_PoolPuddleSize -- (V14.3) [I..], ULONG
FUNCTION
Specify the puddle size for the tables memory pool.
Defaults to 2048. It is ignored if you specify your
own pool with MUIA_Pkb_Pool.
SEE ALSO
MUIA_Pkb_Pool, MUIA_Pkb_PoolThreshSize
Pkb.mcc/MUIA_Pkb_PoolThreshSize
NAME
MUIA_Pkb_PoolThreshSize -- (V14.3) [I..], ULONG
FUNCTION
Specify the thresh size for the tables memory pool.
Defaults to 1024. It is ignored if you specify your
own pool with MUIA_Pkb_Pool.
SEE ALSO
MUIA_Pkb_Pool, MUIA_Pkb_PoolPuddleSize
Pkb.mcc/MUIA_Pkb_Octv_Name
NAME
MUIA_Pkb_Octv_Name -- (V14.3) [I..], BOOL
FUNCTION
Indicates whether a bar will be shown below the keyboard.
SEE ALSO
Pkb.mcc/MUIA_Pkb_Octv_Base
NAME
MUIA_Pkb_Octv_Base -- (V14.3) [I..], LONG
FUNCTION
Indicates the starting number that will be shown on the bar below the
keyboard.
NOTES
Beware: key codes are NOT affected by the octave number shown on the
bar.
SEE ALSO
MUIA_Pkb_Octv_Name
Pkb.mcc/MUIA_Pkb_Octv_Range
NAME
MUIA_Pkb_Octv_Range -- (V14.3) [I...], ULONG
FUNCTION
Indicates how many octaves will be shown on the keyboard.
Accepted values: 1...11
SEE ALSO
Pkb.mcc/MUIA_Pkb_Octv_Start
NAME
MUIA_Pkb_Octv_Start -- (V14.3) [I.G], ULONG
FUNCTION
Indicates the starting octave for the keyboard.
NOTES
Beware: MUIA_Pkb_Octv_Start + MUIA_Pkb_Octv_Range MUST be <= 11,
otherwise MUIA_Pkb_Octv_Start will be automatically decreased until the
condition is satisfied.
SEE ALSO
Pkb.mcc/MUIA_Pkb_Key_Release
NAME
MUIA_Pkb_Key_Release -- (V14.3) [.S.N], ULONG
FUNCTION
Releases a key.
NOTES
The code ranges between 0 and 131 and is independent of the
octave number that could be shown on the bottom bar.
SEE ALSO
MUIA_Pkb_Octv_Start, MUIA_Pkb_Octv_Range, MUIA_Pkb_Key_Press
Pkb.mcc/MUIA_Pkb_Key_Press
NAME
MUIA_Pkb_Key_Press -- (V14.3) [.S..], ULONG
FUNCTION
Presses a key.
NOTES
The code ranges between 0 and 131 and is independent of the
octave number that could be shown on the bottom bar.
SEE ALSO
MUIA_Pkb_Octv_Start, MUIA_Pkb_Octv_Range, MUIA_Pkb_Key_Release
Pkb.mcc/MUIA_Pkb_Range_Head
NAME
MUIA_Pkb_Range_Head -- (V14.3) [.SGM], ULONG
FUNCTION
Sets or returns the group leader in range mode.
INPUTS
MUIV_Pkb_Range_Head_OFF
MUIV_Pkb_Range_Head_BOT
MUIV_Pkb_Range_Head_TOP
SEE ALSO
MUIA_Pkb_Mode
Pkb.mcc/MUIA_Pkb_Range_Start
NAME
MUIA_Pkb_Range_Start -- (V14.3) [.SGM], LONG
FUNCTION
Sets or returns the code of the lowest note in the LAST active range.
NOTES
When setting, you have to provide a valid positive value.
Getting this attribute you are always returned a value ranging between
0 and 131, or -1 if there is no active range.
SEE ALSO
MUIA_Pkb_Range_End, MUIA_Pkb_Mode
Pkb.mcc/MUIA_Pkb_Range_End
NAME
MUIA_Pkb_Range_End -- (V14.3) [.SGM], LONG
FUNCTION
Sets or returns the code of the highest note in the LAST active range.
NOTES
When setting, you have to provide a valid positive value.
Getting this attribute, you are always returned a value ranging between
0 and 131, or -1 if there is no active range.
SEE ALSO
MUIA_Pkb_Range_Start, MUIA_Pkb_Mode
Pkb.mcc/MUIA_Pkb_Low
NAME
MUIA_Pkb_Low -- (V14.3) [..G.], ULONG
FUNCTION
Returns the code of the lowest note in the keyboard.
SEE ALSO
MUIA_Pkb_High
Pkb.mcc/MUIA_Pkb_High
NAME
MUIA_Pkb_High -- (V14.3) [..G.], ULONG
FUNCTION
Returns the code of the highest note in the keyboard.
SEE ALSO
MUIA_Pkb_Low
Pkb.mcc/MUIM_Pkb_Reset
NAME
MUIM_Pkb_Reset
SYNOPSIS
DoMethod(obj, MUIM_Pkb_Reset);
FUNCTION
Resets the keyboard by releasing all keys.
SEE ALSO
Pkb.mcc/MUIM_Pkb_Refresh
NAME
MUIM_Pkb_Refresh -- (V14.3)
SYNOPSIS
DoMethod(obj, MUIM_Pkb_Refresh);
FUNCTION
Refreshes the keyboard.
NOTES
This method can be useful if some changes have been made while the
keyboard had MUIA_Pkb_Quiet set to TRUE.
SEE ALSO
MUIA_Pkb_Quiet
Pkb.mcc/MUIM_Pkb_Range
NAME
MUIM_Pkb_Range -- (V14.3)
SYNOPSIS
DoMethod(obj, MUIM_Pkb_Range, ULONG nstart, ULONG nend);
FUNCTION
Creates a range between the nstart and nend values.
NOTES
The nstart value doesn't necessarily need to be lower than nend, but
they both have to be in the 0...131 range.
SEE ALSO
MUIA_Pkb_Range_Start, MUIA_Pkb_Range_End
Pkb.mcc/MUIM_Pkb_Range_Reset
NAME
MUIM_Pkb_Range_Reset -- (V14.3)
SYNOPSIS
DoMethod(obj, MUIM_Pkb_Range_Reset);
FUNCTION
Resets the LAST active range, so releasing all the keys which formed
it.
NOTES
After calling this method the MUIA_Pkb_Range_Start and
MUIA_Pkb_Range_End attributes are reset.
SEE ALSO
MUIA_Pkb_Range_Start, MUIA_Pkb_Range_End
Pkb.mcc/MUIM_Pkb_Range_Refresh
NAME
MUIM_Pkb_Range_Refresh -- (V14.3)
SYNOPSIS
DoMethod(obj, MUIM_Pkb_Range_Refresh);
FUNCTION
Refreshes the active range, that is, the group of notes which are
included between MUIA_Pkb_Range_Start and MUIA_Pkb_Range_End.
SEE ALSO
MUIA_Pkb_Range_Start, MUIA_Pkb_Range_End
Pkb.mcc/MUIM_Pkb_Jump
NAME
MUIM_Pkb_Jump -- (V14.3)
SYNOPSIS
DoMethod(obj, MUIM_Pkb_Jump, ULONG ncode);
FUNCTION
Jumps to the note corresponding to the ncode code, thus making it
visible.
NOTES
The ncode value must necessarily be included amongst the ones provided
by the keyboard, that is, between MUIA_Pkb_Low and MUIA_Pkb_High.
SEE ALSO
MUIA_Pkb_Range_Start, MUIA_Pkb_Range_End
Pkb.mcc/MUIA_Pkb_InputEnable
NAME
MUIA_Pkb_InputEnable -- (V14.4) [ISG], BOOL
FUNCTION
Enables or disables user interaction with the keyboard.
INPUTS
TRUE (default)
FALSE
NOTES
Set this attribute if you want to prevent the keyboard from reacting to
user's mouse clicks, so that it doesn't receive any event.
When setting the MUIA_Pkb_Quiet tag to TRUE, the keyboard SEEMS not
to react, because keys are not updated, but attributes depending on
lowering and raising of keys - like MUIA_Pkb_Key_Release,
MUIA_Pkb_Key_Press etc. - are actually updated.
SEE ALSO
MUIA_Pkb_Quiet
Pkb.mcc/MUIA_Pkb_ExcludeLow
NAME
MUIA_Pkb_ExcludeLow -- (V14.4) [ISG], ULONG
FUNCTION
Sets or returns the number of halftones excluded from the lowest part of
the keyboard.
INPUTS
0 : no keys excluded (default)
1...11 : excludes C...Bb
NOTES
The Pkb class CANNOT draw incomplete octaves.
Anyway, sometimes you need to have a keyboard which starts with a note
different from the typical C.
You can obtain this by setting MUIA_Pkb_ExcludeLow to the proper
number of halftones.
The excluded keys will be drawn anyway, but they will have a different
colour and they will not have any effect.
SEE ALSO
MUIA_Pkb_ExcludeHigh
Pkb.mcc/MUIA_Pkb_ExcludeHigh
NAME
MUIA_Pkb_ExcludeHigh -- (V14.4) [ISG], ULONG
FUNCTION
Sets or returns the number of halftones excluded from the highest part of
the keyboard.
INPUTS
0 : no keys excluded (default)
1...11 : excludes B...Db
NOTES
The Pkb class CANNOT draw incomplete octaves.
Anyway, sometimes you need to have a keyboard which ends with a note
different from the typical B.
You can obtain this by setting MUIA_Pkb_ExcludeHigh to the proper
number of halftones.
The excluded keys will be drawn anyway, but they will have a different
colour and they will not have any effect.
SEE ALSO
MUIA_Pkb_ExcludeLow
Pkb.mcc/MUIA_Pkb_Type
NAME
MUIA_Pkb_Type -- (V14.6) [I.G], ULONG
FUNCTION
Indicates the keyboard type.
INPUTS
MUIV_Pkb_Type_NORMAL (default)
MUIV_Pkb_Type_SMALL
NOTES
The standard 105x50 pixels size of an octave can sometimes be excessive,
depending on the particular application or the screen size. In such
cases, or when the programmer feels like doing it, MUIA_Pkb_Type can be
set to MUIV_Pkb_Type_SMALL to obtain a reduced 70x39 pixels size for the
octave.
SEE ALSO